Skip to content

Conversation

mb1511
Copy link

@mb1511 mb1511 commented Apr 2, 2024

We ran into an issue the other day trying to add a custom resolver function to a DjangoConnectionField:

class Query(ObjectType)
    some_field = DjangoConnectionField(SomeType, resolver=some_resolver)

In this case the some_resolver function is simply ignored.

We managed to work around it by defining the resolver on the query using the default def resolve_{field}: pattern and just linked that to return the result of the function we wanted to use.

Admittedly, its a pretty niche use case, but still thought it would be nice to try and fix.

@mb1511 mb1511 force-pushed the fix-connection-field-custom-resolver branch from a1cc52c to 5436a28 Compare April 16, 2024 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants